package cn.iocoder.aics.module.member.controller.app.chathistory.vo;

import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.List;

// 聊天请求（用户层）
@Data
public class ChatRequest {
    @NotEmpty(message = "消息链不能为空")
    private List<Message> messages;

    // 转换逻辑
    public CompletionRequest toCompletionRequest() {
        return CompletionRequest.builder()
                .model("deepseek-chat")
                .messages(this.messages)
                .stream(true)
                .maxTokens(2000)
                .build();
    }
}